package com.roc.steelend.util;


import com.roc.steelend.controller.vo.account.AccountSpecialBuyOrderIdDetail;
import com.roc.steelend.controller.vo.account.AccountSpecialSaleOrderIdDetail;

import java.util.Comparator;

public class SaleOrderByAccountComparator implements Comparator<AccountSpecialSaleOrderIdDetail> {
    @Override
    public int compare(AccountSpecialSaleOrderIdDetail o1, AccountSpecialSaleOrderIdDetail o2) {
        if (o1.getOutStorageDate().before(o2.getOutStorageDate())){
            return -1;
        }else if (o1.getOutStorageDate()==o2.getOutStorageDate()){
            return 0;
        }else {
            return 1;
        }
    }

}
